/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 * 
 * If you have edited the file, please update
 * all the last-modified fields manually. Thanks!
 *
 * @last-modified by: 
 * @last-modified date: 
 * @last-modified time: 
 *
 * @author Swee Zhi
 * @date-created Oct 24, 2011    @time-created 6:19:30 PM
 *
 * @project: 
 * @module: 
 * @institution: 
 *
 */
package util.enumhelper;

import util.enumeration.Interest;
import util.enumeration.Language;

public class LocalizedInterest {
    // alphabetical order
    public static String getLocalizedInterestAsString(Interest interest, String locale) {
        String localizedInterest = "";
        
        // en_US ENGLISH, UNITED STATES
        if (locale.equals(SupportedLocale.getSupportedLocaleStringByLanguage(Language.ENGLISH_US))) {
            localizedInterest = getInterest_EN_US(interest);
        }
        // en_SG ENGLISH, SINGAPORE
        else
        if (locale.equals(SupportedLocale.getSupportedLocaleStringByLanguage(Language.ENGLISH_SINGAPORE))) {
            localizedInterest = getInterest_EN_SG(interest);
        }
        // ms_MY MALAY, MALAYSIA
        else
        if (locale.equals(SupportedLocale.getSupportedLocaleStringByLanguage(Language.MALAY))) {
            localizedInterest = getInterest_MS_MY(interest);
        }
        
        // zh_CN CHINESE, CHINA
        else
        if (locale.equals(SupportedLocale.getSupportedLocaleStringByLanguage(Language.CHINESE_CHINA))) {
            localizedInterest = getInterest_ZH_CN(interest);
        }
        // other language...
        else {
            localizedInterest = getInterest_EN_US(interest);
        }
        
        return localizedInterest;
    }
    
    // simplified chinese (zh_CN)
    private static String getInterest_ZH_CN(Interest interest) {
        String localizedInterest = "";
        
        switch (interest) {
            case ANIMALS: localizedInterest = "动物"; break;
            case ARTS: localizedInterest = "艺术"; break;
            case AUTOMOBILES: localizedInterest = "汽车"; break;
            case BEACH: localizedInterest = "沙滩"; break;
            case BEAUTY: localizedInterest = "美容"; break;
            case COMPUTERS: localizedInterest = "电脑"; break;
            case CULTURE: localizedInterest = "文化"; break;
            case DANCING: localizedInterest = "舞蹈"; break;
            case ELECTRONICS: localizedInterest = "电子"; break;
            case FISH: localizedInterest = "鱼"; break;
            case FISHING: localizedInterest = "钓鱼"; break;
            case FOOD: localizedInterest = "食品"; break;
            case INDOOR_ACTIVITIES: localizedInterest = "室内活动"; break;
            case NATURE: localizedInterest = "自然"; break;
            case OUTDOOR_ACTIVITIES: localizedInterest = "户外活动"; break;
            case SPORTS: localizedInterest = "体育"; break;
            default: localizedInterest = "-"; break;
        }
        return localizedInterest;
    }
    
    // default (en_US)
    private static String getInterest_EN_US(Interest interest) {
        String localizedInterest = "";
        
        switch (interest) {
            case ANIMALS: localizedInterest = "Animals"; break;
            case ARTS: localizedInterest = "Arts"; break;
            case AUTOMOBILES: localizedInterest = "Automobiles"; break;
            case BEACH: localizedInterest = "Beach"; break;
            case BEAUTY: localizedInterest = "Beauty"; break;
            case COMPUTERS: localizedInterest = "Computers"; break;
            case CULTURE: localizedInterest = "Culture"; break;
            case DANCING: localizedInterest = "Dancing"; break;
            case ELECTRONICS: localizedInterest = "Electronics"; break;
            case FISH: localizedInterest = "Fish"; break;
            case FISHING: localizedInterest = "Fishing"; break;
            case FOOD: localizedInterest = "Food"; break;
            case INDOOR_ACTIVITIES: localizedInterest = "Indoor Activities"; break;
            case NATURE: localizedInterest = "Nature"; break;
            case OUTDOOR_ACTIVITIES: localizedInterest = "Outdoor Activities"; break;
            case SPORTS: localizedInterest = "Sports"; break;
            default: localizedInterest = "-"; break;
        }
        return localizedInterest;
    }
    
    // singapore english (en_SG)
    private static String getInterest_EN_SG(Interest interest) {
        String localizedInterest = "";
        
        switch (interest) {
            case ANIMALS: localizedInterest = "Animals"; break;
            case ARTS: localizedInterest = "Arts"; break;
            case AUTOMOBILES: localizedInterest = "Automobiles"; break;
            case BEACH: localizedInterest = "Beach"; break;
            case BEAUTY: localizedInterest = "Beauty"; break;
            case COMPUTERS: localizedInterest = "Computers"; break;
            case CULTURE: localizedInterest = "Culture"; break;
            case DANCING: localizedInterest = "Dancing"; break;
            case ELECTRONICS: localizedInterest = "Electronics"; break;
            case FISH: localizedInterest = "Fish"; break;
            case FISHING: localizedInterest = "Fishing"; break;
            case FOOD: localizedInterest = "Food"; break;
            case INDOOR_ACTIVITIES: localizedInterest = "Indoor Activities"; break;
            case NATURE: localizedInterest = "Nature"; break;
            case OUTDOOR_ACTIVITIES: localizedInterest = "Outdoor Activities"; break;
            case SPORTS: localizedInterest = "Sports"; break;
            default: localizedInterest = "-"; break;
        }
        return localizedInterest;
    }
    
    // bahasa malaysia (ms_MY)
    private static String getInterest_MS_MY(Interest interest) {
        String localizedInterest = "";
        
        switch (interest) {
            case ANIMALS: localizedInterest = "Haiwan"; break;
            case ARTS: localizedInterest = "Seni"; break;
            case AUTOMOBILES: localizedInterest = "Automobil"; break;
            case BEACH: localizedInterest = "Beach"; break;
            case BEAUTY: localizedInterest = "Beauti"; break;
            case COMPUTERS: localizedInterest = "Komputer"; break;
            case CULTURE: localizedInterest = "Kebudayaan"; break;
            case DANCING: localizedInterest = "Menari"; break;
            case ELECTRONICS: localizedInterest = "Elektroniks"; break;
            case FISH: localizedInterest = "Ikan"; break;
            case FISHING: localizedInterest = "Perikanan"; break;
            case FOOD: localizedInterest = "Makanan"; break;
            case INDOOR_ACTIVITIES: localizedInterest = "Aktiviti Dalaman"; break;
            case NATURE: localizedInterest = "Bentuk"; break;
            case OUTDOOR_ACTIVITIES: localizedInterest = "Aktiviti Luar"; break;
            case SPORTS: localizedInterest = "Sukan"; break;
            default: localizedInterest = "-"; break;
        }
        return localizedInterest;
    }
    
    // new interest for localized language template (copy and paste to use)
//    private static String getInterest_XX_YY(Interest interest) {
//        String localizedInterest = "";
//        
//        switch (interest) {
//            case ANIMALS: localizedInterest = "客家菜"; break;
//            case ARTS: localizedInterest = "福建美食"; break;
//            case AUTOMOBILES: localizedInterest = "闽菜"; break;
//            case BEACH: localizedInterest = "上海菜"; break;
//            case BEAUTY: localizedInterest = "潮州美食"; break;
//            case COMPUTERS: localizedInterest = "新疆美食"; break;
//            case CULTURE: localizedInterest = "新疆美食"; break;
//            case DANCING: localizedInterest = "马来美食"; break;
//            case ELECTRONICS: localizedInterest = "印度美食"; break;
//            case FISH: localizedInterest = "中西美食"; break;
//            case FISHING: localizedInterest = "日本料理"; break;
//            case FOOD: localizedInterest = "韩国料理"; break;
//            case INDOOR_ACTIVITIES: localizedInterest = "中西美食"; break;
//            case NATURE: localizedInterest = "日本料理"; break;
//            case OUTDOOR_ACTIVITIES: localizedInterest = "韩国料理"; break;
//            case SPORTS: localizedInterest = "韩国料理"; break;
//            default: localizedInterest = "-"; break;
//        }
//        return localizedInterest;
//    }
}
